$(document).ready(function () {
    layui.use('form', function () {
        var form = layui.form;
        form.render();
    });
});

function addDevice() {

    var formJSON = $("#device-submit-form").serializeObject();

    // 添加设备
    ajax(
        "/admin/device/addDevice", "POST",
        formJSON, true, true, true
    ).done(function () {
        loadingPage("/admin/device/device");;
    });

}